home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
win
/
ch09
/
09fig08.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
893b
|
40 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright 1997 By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Rotating Cube
DEF Cube Transform {
children Shape {
appearance Appearance {
material Material { }
}
geometry Box { }
}
},
# Sensors
DEF Drag PlaneSensor { },
DEF Touch TouchSensor { },
# Animation clock
DEF Clock TimeSensor {
enabled FALSE
cycleInterval 4.0
loop TRUE
},
# Animation path
DEF CubePath OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0.0 1.0 0.0 0.0,
0.0 1.0 0.0 3.14,
0.0 1.0 0.0 6.28
]
}
]
}
ROUTE Touch.isOver TO Clock.set_enabled
ROUTE Clock.fraction_changed TO CubePath.set_fraction
ROUTE CubePath.value_changed TO Cube.set_rotation
ROUTE Drag.translation_changed TO Cube.set_translation